package string;

public class StartsWithDemo {
    public static void main(String[] args) {
        /*
        boolean startsWith(String s){}
        判断当前字符串是否是给定的字符串(s)开始的
        boolean endsWith(String s){}
        判断当前字符串是否是给定的字符串(s)结束的

         */
        String str="thinking in java";
        boolean starts=str.startsWith("think");
        System.out.println(starts);
        boolean ends=str.endsWith("java");
        System.out.println(ends);



    }
}
